#include "ic_acceptor.h"

void user_handler::ic_acceptor::handle_event(
	boost::shared_ptr<network::message> n)
{
	// creating the handler...
	if(n->type == network::CONNECT) {
		boost::shared_ptr<user_handler::ic_handler> h(
			user_handler::ic_handler::create(
				_ic, n->new_sock, _mgr));
		boost::shared_ptr<handler::multicaster> multi(_multi.lock());
		multi->add_handler(network::RECEIVE, _ic, h);
		multi->add_handler(network::DELETE, _ic, h);
		multi->add_handler(network::DELETE, n->new_sock, h);
	}
}

